home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / share / system-config-printer / ppdippstr.py < prev    next >
Encoding:
Python Source  |  2010-09-28  |  7.1 KB  |  184 lines

  1. #!/usr/bin/env python
  2.  
  3. ## system-config-printer
  4.  
  5. ## Copyright (C) 2008, 2009, 2010 Red Hat, Inc.
  6. ## Authors:
  7. ##  Tim Waugh <twaugh@redhat.com>
  8.  
  9. ## This program is free software; you can redistribute it and/or modify
  10. ## it under the terms of the GNU General Public License as published by
  11. ## the Free Software Foundation; either version 2 of the License, or
  12. ## (at your option) any later version.
  13.  
  14. ## This program is distributed in the hope that it will be useful,
  15. ## but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17. ## GNU General Public License for more details.
  18.  
  19. ## You should have received a copy of the GNU General Public License
  20. ## along with this program; if not, write to the Free Software
  21. ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  22.  
  23. from gettext import gettext as _
  24.  
  25. printer_error_policy = dict()
  26. printer_op_policy = dict()
  27. job_sheets = dict()
  28. job_options = dict()
  29. ppd = dict()
  30. backends = dict()
  31.  
  32. class TranslationDict:
  33.     STR = {}
  34.  
  35.     def __init__ (self, d):
  36.         self.STR = d
  37.  
  38.     def get (self, str):
  39.         return self.STR.get (str, str)
  40.  
  41. def init ():
  42.     ## IPP strings
  43.  
  44.     # Names of printer error policies
  45.     global printer_error_policy
  46.     printer_error_policy = TranslationDict ({
  47.             "abort-job": _("Abort job"),
  48.             "retry-current-job": _("Retry current job"),
  49.             "retry-job": _("Retry job"),
  50.             "stop-printer": _("Stop printer")
  51.             })
  52.     
  53.     # Names of printer operation policies
  54.     global printer_op_policy
  55.     printer_op_policy = TranslationDict ({
  56.             "default": _("Default behavior"),
  57.             "authenticated": _("Authenticated")
  58.             })
  59.  
  60.     # Names of banner pages.
  61.     global job_sheets
  62.     job_sheets = TranslationDict ({
  63.             "none": _("None"),
  64.             "classified": _("Classified"),
  65.             "confidential": _("Confidential"),
  66.             "secret": _("Secret"),
  67.             "standard": _("Standard"),
  68.             "topsecret": _("Top secret"),
  69.             "unclassified": _("Unclassified")
  70.             })
  71.  
  72.     # Names of job-hold-until values.
  73.     global job_options
  74.     job_options["job-hold-until"] = TranslationDict ({
  75.             "no-hold": _("No hold"),
  76.             "indefinite": _("Indefinite"),
  77.             "day-time": _("Daytime"),
  78.             "evening": _("Evening"),
  79.             "night": _("Night"),
  80.             "second-shift": _("Second shift"),
  81.             "third-shift": _("Third shift"),
  82.             "weekend": _("Weekend")
  83.             })
  84.  
  85.     ## Common PPD strings
  86.  
  87.     # Foomatic strings
  88.  
  89.     # These are PPD option and group names and values.
  90.     global ppd
  91.     ppd = TranslationDict ({
  92.             "General": _("General"),
  93.  
  94.             # HPIJS options
  95.             "Printout Mode": _("Printout mode"),
  96.             "Draft (auto-detect paper type)":
  97.                 _("Draft (auto-detect-paper type)"),
  98.             "Draft Grayscale (auto-detect paper type)":
  99.                 _("Draft grayscale (auto-detect-paper type)"),
  100.             "Normal (auto-detect paper type)":
  101.                 _("Normal (auto-detect-paper type)"),
  102.             "Normal Grayscale (auto-detect paper type)":
  103.                 _("Normal grayscale (auto-detect-paper type)"),
  104.             "High Quality (auto-detect paper type)":
  105.                 _("High quality (auto-detect-paper type)"),
  106.             "High Quality Grayscale (auto-detect paper type)":
  107.                 _("High quality grayscale (auto-detect-paper type)"),
  108.             "Photo (on photo paper)": _("Photo (on photo paper)"),
  109.             "Best Quality (color on photo paper)":
  110.                 _("Best quality (color on photo paper)"),
  111.             "Normal Quality (color on photo paper)":
  112.                 _("Normal quality (color on photo paper)"),
  113.  
  114.             "Media Source": _("Media source"),
  115.             "Printer default": _("Printer default"),
  116.             "Photo Tray": _("Photo tray"),
  117.             "Upper Tray": _("Upper tray"),
  118.             "Lower Tray": _("Lower tray"),
  119.             "CD or DVD Tray": _("CD or DVD tray"),
  120.             "Envelope Feeder": _("Envelope feeder"),
  121.             "Large Capacity Tray": _("Large capacity tray"),
  122.             "Manual Feeder": _("Manual feeder"),
  123.             "Multi Purpose Tray": _("Multi-purpose tray"),
  124.  
  125.             "Page Size": _("Page size"),
  126.             "Custom": _("Custom"),
  127.             "Photo or 4x6 inch index card": _("Photo or 4x6 inch index card"),
  128.             "Photo or 5x7 inch index card": _("Photo or 5x7 inch index card"),
  129.             "Photo with tear-off tab": _("Photo with tear-off tab"),
  130.             "3x5 inch index card": _("3x5 inch index card"),
  131.             "5x8 inch index card": _("5x8 inch index card"),
  132.             "A6 with tear-off tab": _("A6 with tear-off tab"),
  133.             "CD or DVD 80 mm": _("CD or DVD 80mm"),
  134.             "CD or DVD 120 mm": _("CD or DVD 120mm"),
  135.  
  136.             "Double-Sided Printing": _("Double-sided printing"),
  137.             "Long Edge (Standard)": _("Long edge (standard)"),
  138.             "Short Edge (Flip)": _("Short edge (flip)"),
  139.             "Off": _("Off"),
  140.  
  141.             "Resolution, Quality, Ink Type, Media Type":
  142.                 _("Resolution, quality, ink type, media type"),
  143.             "Controlled by 'Printout Mode'": _("Controlled by 'Printout mode'"),
  144.             "300 dpi, Color, Black + Color Cartr.":
  145.                 _("300 dpi, color, black + color cartridge"),
  146.             "300 dpi, Draft, Color, Black + Color Cartr.":
  147.                 _("300 dpi, draft, color, black + color cartridge"),
  148.             "300 dpi, Draft, Grayscale, Black + Color Cartr.":
  149.                 _("300 dpi, draft, grayscale, black + color cartridge"),
  150.             "300 dpi, Grayscale, Black + Color Cartr.":
  151.                 _("300 dpi, grayscale, black + color cartridge"),
  152.             "600 dpi, Color, Black + Color Cartr.":
  153.                 _("600 dpi, color, black + color cartridge"),
  154.             "600 dpi, Grayscale, Black + Color Cartr.":
  155.                 _("600 dpi, grayscale, black + color cartridge"),
  156.             "600 dpi, Photo, Black + Color Cartr., Photo Paper":
  157.                 _("600 dpi, photo, black + color cartridge, photo paper"),
  158.             "600 dpi, Color, Black + Color Cartr., Photo Paper, Normal":
  159.                 _("600 dpi, color, black + color cartridge, photo paper, normal"),
  160.             "1200 dpi, Photo, Black + Color Cartr., Photo Paper":
  161.                 _("1200 dpi, photo, black + color cartridge, photo paper"),
  162.             })
  163.  
  164.     ## Common backend descriptions
  165.     global backends
  166.     backends = TranslationDict ({
  167.             "Internet Printing Protocol (ipp)":
  168.                 _("Internet Printing Protocol (ipp)"),
  169.             "Internet Printing Protocol (http)":
  170.                 _("Internet Printing Protocol (http)"),
  171.             "Internet Printing Protocol (https)":
  172.                 _("Internet Printing Protocol (https)"),
  173.             "LPD/LPR Host or Printer":
  174.                 _("LPD/LPR Host or Printer"),
  175.             "AppSocket/HP JetDirect":
  176.                 _("AppSocket/HP JetDirect"),
  177.             "Serial Port #1":
  178.                 _("Serial Port #1"),
  179.             "LPT #1":
  180.                 _("LPT #1"),
  181.             "Windows Printer via SAMBA":
  182.                 _("Windows Printer via SAMBA"),
  183.             })
  184.